﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TXTD.Admin.Data.Entitys;
using TXTD.Admin.Data.Entitys.System;

namespace TXTD.Admin.Data.EntityConfiguration.System
{
    public class SysMenuEntityTypeConfiguration : IEntityTypeConfiguration<SysMenu>
    {
        public void Configure(EntityTypeBuilder<SysMenu> builder)
        {
            //主键
            builder.HasKey(e => e.MenuId);

            builder.Property(e => e.MenuId).HasMaxLength(32);
            builder.Property(e => e.MenuName).HasMaxLength(200);
            builder.Property(e => e.MenuTitle).HasMaxLength(500);
            builder.Property(e => e.MenuPath).HasMaxLength(500);
            builder.Property(e => e.MenuType).HasMaxLength(100);
            builder.Property(e => e.ComponentPath).HasMaxLength(1000);
            builder.Property(e => e.OpenWay).HasMaxLength(50);
            builder.Property(e => e.MenuPermissions).HasMaxLength(300);

            builder.Property(e => e.UpdatedBy).HasMaxLength(32);
            builder.Property(e => e.UpdatedBy).HasMaxLength(32);
        }
    }
}
